﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using VonaJobs.BLL;
using VonaJobs.DAL.DAO;

namespace VonaJobs.UI.Employers
{
    public partial class PostJobFrm : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }
        public void EmpJobPosting(object sender,EventArgs eventArgs)
        {

            try
            {
                Job job=new Job();
                job.PostingDate =Convert.ToDateTime(txtPostingDate.Value);
                job.ClosingDate = Convert.ToDateTime(txtClosingDate.Value);
                job.JobTitle = txtJobTitle.Value;
                job.JobType = selectJobType.Value;
                job.WorkType = selectWorkType.Value;
                job.Salary =Convert.ToInt32(txtSalary.Value);
                job.NumberOfVacancy = Convert.ToInt32(txtVacancyNumber.Value);
                job.JobDescription = txtJobDescription.Value;
                job.RequiredSkill = txtRequiredSkills.Value;
                job.Experience =Convert.ToInt32(txtExperience.Value);
                JobManager jobManager=new JobManager();
                jobManager.PostNewJob(job);
            }
            catch (Exception)
            {
                
                
            }
        }
    }
}